<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<?php echo base_url();?>css/reset.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url();?>css/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url()?>js/jquery.js">
</script>


<script type="text/javascript">
    function rand_img(){
        var randnum = Math.random();
        
        var inum = <?php echo count($change_images)?>;
        
        // Change this number to the number of images you are using.
        var rand1 = Math.round(randnum * (inum-1));
        images = new Array();

        <?php 
        for($i=0;$i < count($change_images);$i++){
            echo "images[$i]" ."='".base_url()."images/" .$change_images[$i]->url_image  ."';";
        }
        ?>
        // Ensure you have an array item for every image you are using.
        var image = images[rand1];
        document.getElementById('bg_img_change').src=image;
    }
    function random_bg(){
        setInterval(rand_img,2000);
    }      
</script>
<title>Index</title>
</head>
    <body onload="random_bg()" >
    
<div id="slide"><img id="bg_img_change" src="<?php base_url() ?>images/slide_1.jpg" width="1024" height="599" />	</div>
		<div id="width">
			<div id="in">
				<div id="logo">
                	<a href="index.html"><img src="<?php base_url() ?>images/logo.png" /></a>
                    <div class="header_in"><img src="<?php base_url() ?>images/slogan.png" /></div>
                </div>
				<div class="right_header">
                    <a href="#" class="links_2">2</a>
                    <a href="#" class="links_3">3</a>
                    <a href="#" class="links_4">4</a>
                    <div class="clearboth_head">
                    	<a href="#" class="flag_1" title="EN">1</a>
                    	<a href="#" class="flag_2" title="VN">2</a>
                    </div>
				</div>
			</div>
            <div id="items">
				<ul class="nav">
					<li><a href="index.html" class="acti">trang chủ</a></li>
                    <li><a href="pages/gioithieu.html">giới thiệu</a>
				  	<li><a href="<?php base_url() ?>pages/sanpham.html">sản phẩm</a>
						<ul class="children">
						  	<li><a href="pages/sanpham-chitiet.html" class="one_line">váy công sở</a></li>
							<li><a href="#" class="one_line">đầm dạ hội</a></li>
							<li><a href="#" class="one_line">thời trang dạo phố</a></li>
							<li><a href="#" class="one_line">sơ mi nữ</a></li>
						</ul>
					</li>
					<li><a href="#">xu hướng hiện nay</a></li>
                    <li><a href="#">phụ kiện</a></li>
					<li><a href="<?php base_url() ?>pages/contact.html">liên hệ</a></li>
				</ul>
                <form class="search" action="#">
                	<div class="box_search">
                		<input type="text" class="in" placeholder="search" />
                		<input type="submit" class="btn_s" value="" />
                	</div>
                </form>
			</div>
				
		</div>
		
		<div id="width">
			<div class="slide_inner">
				
			</div>
		</div>
		
		<div id="width">
			<div class="bg">
                            <?php foreach ($chungloai as $loai) {
                               ?>
                            
			  <div class="box_2">
                                <div class="box_img"><a href="#"><img src="<?php echo base_url()."images/".$loai->hinhdaidien?>" class="img_1" title="images_1" alt="images_1" /></a></div>
                                <span class="macro"><span class="dotted"></span><span class="head_text"><?php echo $loai->ten_chung_loai;?></span><span class="dotted2"></span></span>
                                <h4><?php echo $loai->tieude__chungloai_sp; ?></h4>
                                <p><?php echo html_entity_decode($loai->gioithieu); ?><span class="read"><a href="<?php echo base_url()."index/loaisp_detail/" .$loai->ma_chung_loai ?>"><?php echo $loai->ten_chung_loai;?> >></a></span></p>
                        </div>
                        <?php } ?>
                <div class="clearboth">
                	<span class="macro"><span class="dotted3"></span><span class="head_text2">liên hệ với chúng tôi</span><span class="dotted4"></span></span>
                 </div>
                 <div class="clear_foot">
                	<div id="items2">
                        <a href="#"><img src="<?php base_url() ?>images/map_google.gif" /></a>
                    </div>
                    <div class="foot_text">
                        <p>orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu sndard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
                    </div>
                    <div class="floatright">
                    	<a href="#"><img src="<?php base_url() ?>images/yahoo.gif" /></a>
                    </div>
                </div>
			</div>
		</div>
	</div>

</body>
</html>
